projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a452fb
)
Fix cargo test --no-run
author
Alex Crichton
<alex@alexcrichton.com>
Sat, 21 Mar 2015 01:52:15 +0000
(18:52 -0700)
committer
Alex Crichton
<alex@alexcrichton.com>
Sat, 21 Mar 2015 01:52:15 +0000
(18:52 -0700)
src/cargo/ops/cargo_test.rs
patch
|
blob
|
history
diff --git
a/src/cargo/ops/cargo_test.rs
b/src/cargo/ops/cargo_test.rs
index a2831a38a0090894889a459cf8893bf8363a63d8..2af21c2fcc86dee84dd07bc146dac30ebff238b6 100644
(file)
--- a/
src/cargo/ops/cargo_test.rs
+++ b/
src/cargo/ops/cargo_test.rs
@@
-20,12
+20,11
@@
pub fn run_tests(manifest_path: &Path,
Err(e) => return Ok(Some(e)),
};
- let libs = compile.package.targets().iter().filter_map(|target| {
- if !target.doctested() || !target.is_lib() {
- return None
- }
- Some((target.src_path(), target.name()))
- });
+ if options.no_run { return Ok(None) }
+
+ let libs = compile.package.targets().iter()
+ .filter(|t| t.doctested())
+ .map(|t| (t.src_path(), t.name()));
for (lib, name) in libs {
try!(config.shell().status("Doc-tests", name));